package moviles.comprap;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;

import com.example.comprap.R;

public class MainActivity extends Activity {

	private TextView txt;
	private TextView txtServicios;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
			
		  txt = (TextView) findViewById(R.id.textView7); 
		    // bind listeners
		  txt.setOnClickListener(new View.OnClickListener() {
			  @Override
			  public void onClick(View v) {Intent intent = new Intent(getBaseContext(), VerProductos.class);
		    	startActivity(intent);
			  }
			});		
		  
		  txtServicios = (TextView) findViewById(R.id.textView8); 
		    // bind listeners
		  txtServicios.setOnClickListener(new View.OnClickListener() {
			  @Override
			  public void onClick(View v) {Intent intent = new Intent(getBaseContext(), VerServicios.class);
		    	startActivity(intent);
			  }
			});
	}		  
		  

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
		
	public void verProductosCategoria(View v) {
    	Intent intent = new Intent(this, VerProductos.class);
    	startActivity(intent);
    }
	
	public void verServicios(View v) {
    	Intent intent = new Intent(this, VerServicios.class);
    	startActivity(intent);
    }
	
	public void verTiendas(View v) {
    	Intent intent = new Intent(this, VerTiendas.class);
    	startActivity(intent);
    }
	
	public void verListas(View v) {
    	Intent intent = new Intent(this, VerListas.class);
    	startActivity(intent);
    }
	
	public void buscador(View v) {
		onSearchRequested();
    }
	
	public void opciones(View v) {
    	Intent intent = new Intent(this, Opciones.class);
    	startActivity(intent);
    }
	
	public void usuario(View v) {
    	Intent intent = new Intent(this, Usuario.class);
    	startActivity(intent);
    }
	
	public void home(View v) {
    	//No hace nada
    }

}
